package Demo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-04-26
 * Time: 14:50
 */
public class TestDemo1 {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        System.out.println(myArrayList.size());
        myArrayList.clear();
        myArrayList.display();

    }
    public static void main2(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(0,999);
        myArrayList.add(1,998);
        myArrayList.add(2,997);
        myArrayList.add(3,996);
        myArrayList.set(0,10);
        myArrayList.set(3,10);
        myArrayList.display();
        myArrayList.remove(10);
        myArrayList.remove(998);
        myArrayList.display();

    }
    public static void main1(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
       /* myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);
        myArrayList.add(6);
        myArrayList.add(6,999);
        int dex = myArrayList.indexOf(999);
        myArrayList.display();
        System.out.println(myArrayList.contains(888));
        System.out.println(dex);*/
        System.out.println(myArrayList.get(2));
    }
}